import {Subscription} from "rxjs";
import {NzProgressStatusType} from "ng-zorro-antd/progress";

export class UploadFileTask {
  guid: string = ''
  md5: string = ''
  name: string = ''
  size: number = 0
  target: string = ''
  progress: number = 0
  canceler: Subscription|undefined
  ready: boolean = false
  offset:number = 0
  file:any
  finished?:number=0
  type?:string='normal'
  status: NzProgressStatusType = 'normal'
  constructor(guid:string,file?:File) {
    this.guid=guid
    if (file){
      this.file=file
      this.name=file.name
      this.size= file.size
    }else {

    }
  }
}
